<!DOCTYPE html>
<html class="no-js">
<head>
	<meta charset="utf-8">
	<title>生活缴费</title>
	<meta name="description" content="">
	<meta name="HandheldFriendly" content="True">
	<meta name="MobileOptimized" content="320">
	<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui, user-scalable=no">
	<meta http-equiv="cleartype" content="on">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="/assets/base/lifefee/css/style.css">
	<link rel="stylesheet" href="/assets/public/layermobile/css/layer.css?v={BEESCRM:$time}">

</head>
<body>

<!--加载动画-->
<div class="circle-loadding">
	<svg width="52" height="52" id="loadding">
		<circle r="6" cx="26" cy="6">
			<animate attributeName="r" values="0;6;6;6;0" begin="875ms" dur="1000ms" repeatCount="indefinite"></animate>
			<animate attributeName="cx" values="26;26;26;26;26" dur="875ms" repeatCount="indefinite"></animate>
			<animate attributeName="cy" values="6;6;6;6;6" dur="875ms" repeatCount="indefinite"></animate>
		</circle>
		<circle r="6" cx="12" cy="12">
			<animate attributeName="r" values="0;6;6;6;0" begin="750ms" dur="1000ms" repeatCount="indefinite"></animate>
			<animate attributeName="cx" values="12;12;12;12;12" begin="750ms" dur="1000ms" repeatCount="indefinite"></animate>
			<animate attributeName="cy" values="12;12;12;12;12" begin="750ms" dur="1000ms" repeatCount="indefinite"></animate>
		</circle>
		<circle r="6" cx="6" cy="26">
			<animate attributeName="r" values="0;6;6;6;0" begin="625ms" dur="1000ms" repeatCount="indefinite"></animate>
			<animate attributeName="cx" values="6;6;6;6;6" begin="625ms" dur="1000ms" repeatCount="indefinite"></animate>
			<animate attributeName="cy" values="26;26;26;26;26" begin="625ms" dur="1000ms" repeatCount="indefinite"></animate>
		</circle>
		<circle r="6" cx="12" cy="40">
			<animate attributeName="r" values="0;6;6;6;0" begin="500ms" dur="1000ms" repeatCount="indefinite"></animate>
			<animate attributeName="cx" values="12;12;12;12;12" begin="500ms" dur="1000ms" repeatCount="indefinite"></animate>
			<animate attributeName="cy" values="40;40;40;40;40" begin="500ms" dur="1000ms" repeatCount="indefinite"></animate>
		</circle>
		<circle r="6" cx="26" cy="46">
			<animate attributeName="r" values="0;6;6;6;0" begin="375ms" dur="1000ms" repeatCount="indefinite"></animate>
			<animate attributeName="cx" values="26;26;26;26;26" begin="375ms" dur="1000ms" repeatCount="indefinite"></animate>
			<animate attributeName="cy" values="46;46;46;46;46" begin="375ms" dur="1000ms" repeatCount="indefinite"></animate>
		</circle>
		<circle r="6" cx="40" cy="40">
			<animate attributeName="r" values="0;6;6;6;0" begin="250ms" dur="1000ms" repeatCount="indefinite"></animate>
			<animate attributeName="cx" values="40;40;40;40;40" begin="250ms" dur="1000ms" repeatCount="indefinite"></animate>
			<animate attributeName="cy" values="40;40;40;40;40" begin="250ms" dur="1000ms" repeatCount="indefinite"></animate>
		</circle>
		<circle r="6" cx="46" cy="26">
			<animate attributeName="r" values="0;6;6;6;0" begin="125ms" dur="1000ms" repeatCount="indefinite"></animate>
			<animate attributeName="cx" values="46;46;46;46;46" begin="125ms" dur="1000ms" repeatCount="indefinite"></animate>
			<animate attributeName="cy" values="26;26;26;26;26" begin="125ms" dur="1000ms" repeatCount="indefinite"></animate>
		</circle>
		<circle r="6" cx="40" cy="12">
			<animate attributeName="r" values="0;6;6;6;0" dur="1000ms" repeatCount="indefinite"></animate>
			<animate attributeName="cx" values="40;40;40;40;40" dur="1000ms" repeatCount="indefinite"></animate>
			<animate attributeName="cy" values="12;12;12;12;12"  dur="1000ms" repeatCount="indefinite"></animate>
		</circle>
	</svg>
</div>
<div class="wraper">
	<div class="header flex-box flex-between">
		<a href="javascript:history.go(-1)" class="iconfont icon-llmainpageback"></a>
		<span class="text-center">修改地址</span>
		<a href="#" class="text-right"> </a>
	</div>
	<div class="container">
		<div class="form-list">
			<select id="community">
                <option value="0" selected="selected">请选择所在生活区</option>
				<volist name="community" id="c">
				<option value="{BEESCRM:$c.community_id}" <if condition="$c.community_id eq $cid">selected="selected"</if>>{BEESCRM:$c.community_name}</option>
				</volist>
			</select>
			<span class="iconfont icon-right"></span>
		</div>
		<div class="form-list">
			<select id="building">
				<option value="0">请选择所在楼幢</option>
				<volist name="building" id="b">
					<option value="{BEESCRM:$b.building_id}" <if condition="$b.building_id eq $bid">selected="selected"</if>>{BEESCRM:$b.building_name}</option>
				</volist>
			</select>
			<span class="iconfont icon-right"></span>
		</div>
		<div class="form-list">
			<select id="floor">
				<option value="0">请选择所在楼层</option>
				<volist name="floor" id="f">
					<option value="{BEESCRM:$f.floor_id}" <if condition="$f.floor_id eq $fid">selected="selected"</if>>{BEESCRM:$f.floor_name}</option>
				</volist>
			</select>
			<span class="iconfont icon-right"></span>
		</div>
		<div class="form-list">
			<select id="room">
				<option value="0">请选择所在房间</option>
				<volist name="room" id="r">
					<option value="{BEESCRM:$r.room_id}" <if condition="$r.room_id eq $rid">selected="selected"</if>>{BEESCRM:$r.room_name}</option>
				</volist>
			</select>
			<span class="iconfont icon-right"></span>
		</div>
	</div>
	<if condition = "$tips">
		<div class="form-box">
			<div class="form-list lineheight15">
				<p class="text-red">温馨提示</p>
				<p class="text-12">{BEESCRM:$tips}</p>
			</div>
		</div>
	</if>
	<div class="btn-box">
		<a href="javascript:void(0);" style="padding: 0" class="btn text-center">提交保存</a>
	</div>
</div>
<script src="/assets/base/lifefee/js/jquery-2.1.0.min.js"></script>
<script src="/assets/base/lifefee/js/jq.utils.js"></script>
<script type="text/javascript" src="/assets/public/seajs/sea.js"></script>
<script enter="publicjs/public" id="confnode" async="async" src="/assets/public/config.js"></script>
<script src="/assets/base/common/ajaxgetroominfo.js"></script>
<script>
	$('#year').val({BEESCRM:$nowYear});
	$('#month').val({BEESCRM:$nowMonth});
	$('#community').val({BEESCRM:$community_id});
	$('#building').val({BEESCRM:$building_id});
	$('#floor').val({BEESCRM:$floor_id});
	$('#room').val({BEESCRM:$room_id});
//
	$(function(){
		//调用房间联动js
		ajaxgetroominfo(true, true, true);
	});
    $('.tab-prize').on('click','.option',function(){
        if($(this).hasClass('other')){
            $(this).siblings().removeClass('checked');
        }
        else{
            $(this).toggleClass('checked').siblings().removeClass('checked');
        }
    });


	$(document).on('click','.btn',function(){
		var community_id = $('#community').val();
		var building_id = $('#building').val();
		var floor_id = $('#floor').val();
		var room_id = $('#room').val();

		var community_name = $("#community").find("option:selected").text();
		var floor_name = $("#floor").find("option:selected").text();
		var room_name = $("#room").find("option:selected").text();
		var building_name = $('#building').find("option:selected").text();

		if(community_id == 0){
			fm.alert('请选择生活园区');
			return false;
		}

		if(building_id == 0){
			fm.alert('请选择楼幢');
			return false;
		}

		if(floor_id == 0){
			fm.alert('请选择楼层');
			return false;
		}

		if(room_id == 0){
			fm.alert('请填写寝室号');
			return false;
		}

		$.ajax({
			type: "post",
			dataType: "json",
			data:{community_id:community_id,building_id:building_id,floor_id:floor_id,community_name:community_name,floor_name:floor_name,room_name:room_name,building_name:building_name,room_id:room_id,type:4},
			async:false,
			url: "/base/irsFee/doEdit/irs_fee_id/{BEESCRM:$irs_fee_id}",
			success: function (msg) {
				if(msg.status=="S"){
					fm.alert(msg.message);
					window.location.href="/base/irsFee/userCenter/irs_fee_id/{BEESCRM:$irs_fee_id}"
				}else{
					fm.alert(msg.message);
					return false;
				}
			},
			error:function (XMLHttpRequest, textStatus, errorThrown) {
				alert(XMLHttpRequest.status);
				alert(XMLHttpRequest.readyState);
				alert(textStatus);
			}
		});
		
		
		function getBuild() {
			
		}


//
//		var str = "&community_id="+community_id+"&building_id="+building_id+"&floor_id="+floor_id+"&room_id="+room_id+"&type=4"+"&user_id={BEESCRM:$user_id}";
//		window.location.href="/base/?m=irsFee&a=doEdit&irs_fee_id={BEESCRM:$irs_fee_id}"+str;
    });
</script>
</body>
</html>